package com.yidao.menu.service;

import com.yidao.menu.domain.Menu;
import com.yidao.menu.domain.MenuItem;

class GroovyMenuFactory implements MenuFactory{
	Menu createMenu(){
		new Menu(
				menuItems:[
					 new MenuItem(id:"menu_item_1",name:"客户管理",value:"/customer/index.do",defaultSubItemId:"menu_item_101",
						 subMenuItems:[
				              new MenuItem(id:"menu_item_101",name:"客户列表",value:"/customer/list.do"),
				              new MenuItem(id:"menu_item_102",name:"客户搜索",value:"/customer/search.do"),
				              new MenuItem(id:"menu_item_103",name:"添加客户",value:"/customer/edit.do"),
				              new MenuItem(id:"menu_item_104",name:"人员列表",value:"/person/list.do"),
				              new MenuItem(id:"menu_item_105",name:"人员搜索",value:"/person/search.do"),
				              new MenuItem(id:"menu_item_106",name:"添加人员",value:"/person/edit.do"),
				         ]
					 ),
					 new MenuItem(id:"menu_item_2",name:"个人设置",value:"/user/edit.do",
						 subMenuItems:[
						      new MenuItem(id:"menu_item_201",name:"个人信息",value:"/user/edit.do"),
						      new MenuItem(id:"menu_item_202",name:"个性设置",value:"/user/setting.do"),
						      new MenuItem(id:"menu_item_203",name:"修改密码",value:"/user/password.do")
						 ]
					 ),
					 new MenuItem(id:"menu_item_3",name:"模板管理",value:"value3",
						 subMenuItems:[
						      new MenuItem(id:"menu_item_301",name:"模板列表",value:"/template/list.do"),
						      new MenuItem(id:"menu_item_302",name:"创建模板",value:"/template/edit.do")
						 ]
					 ),
					 new MenuItem(id:"menu_item_4",name:"系统维护",value:"value3"),
					 new MenuItem(id:"menu_item_5",name:"辅助功能",value:"value4"),
					 new MenuItem(id:"menu_item_6",name:"退出",value:"/j_spring_logout")
				],
				defaultSubItemId:"menu_item_1"
		)
	}
}